# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2024/10/19
desc: 
sample: 
"""
import requests

host = 'http://121.11.97.201:9088/pinter/bank'

session = requests.session()
def login():
    url = host+'/api/login'
    params = {'userName':'admin',
              'password':'1234'}
    resp = session.post(url=url,data=params)
    assert resp.status_code==200
    assert resp.json().get('code')=='0'


def query():
    url = host + '/api/query'
    params = {'userName':'admin'}
    resp = session.get(url=url, params=params)
    assert resp.status_code==200
    assert resp.json().get('code')=='0'

login()
query()